3.2.76 \(\int \frac {a+b \log (c x^n)}{(d+e \log (c x^n))^2} \, dx\) [176]

Optimal. Leaf size=89 \[ \frac {e^{-\frac {d}{e n}} (-b d+a e+b e n) x \left (c x^n\right )^{-1/n} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac {(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )} \]

[Out]

(b*e*n+a*e-b*d)*x*Ei((d+e*ln(c*x^n))/e/n)/e^3/exp(d/e/n)/n^2/((c*x^n)^(1/n))+(-a*e+b*d)*x/e^2/n/(d+e*ln(c*x^n)
)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 135, normalized size of antiderivative = 1.52, number of steps used = 7, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2407, 2334, 2337, 2209} \begin {gather*} -\frac {x \left (c x^n\right )^{-1/n} e^{-\frac {d}{e n}} (b d-a e) \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac {x (b d-a e)}{e^2 n \left (e \log \left (c x^n\right )+d\right )}+\frac {b x \left (c x^n\right )^{-1/n} e^{-\frac {d}{e n}} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e*Log[c*x^n])^2,x]

[Out]

-(((b*d - a*e)*x*ExpIntegralEi[(d + e*Log[c*x^n])/(e*n)])/(e^3*E^(d/(e*n))*n^2*(c*x^n)^n^(-1))) + (b*x*ExpInte
gralEi[(d + e*Log[c*x^n])/(e*n)])/(e^2*E^(d/(e*n))*n*(c*x^n)^n^(-1)) + ((b*d - a*e)*x)/(e^2*n*(d + e*Log[c*x^n
]))

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Simp[x*((a + b*Log[c*x^n])^(p + 1)/(b*n*(p + 1)))
, x] - Dist[1/(b*n*(p + 1)), Int[(a + b*Log[c*x^n])^(p + 1), x], x] /; FreeQ[{a, b, c, n}, x] && LtQ[p, -1] &&
 IntegerQ[2*p]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2407

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]*(e_.) + (d_))^(q_.), x_Symbol] :> Int[E
xpandIntegrand[(a + b*Log[c*x^n])^p*(d + e*Log[c*x^n])^q, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && IntegerQ[p
] && IntegerQ[q]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{\left (d+e \log \left (c x^n\right )\right )^2} \, dx &=\int \left (\frac {-b d+a e}{e \left (d+e \log \left (c x^n\right )\right )^2}+\frac {b}{e \left (d+e \log \left (c x^n\right )\right )}\right ) \, dx\\ &=\frac {b \int \frac {1}{d+e \log \left (c x^n\right )} \, dx}{e}+\frac {(-b d+a e) \int \frac {1}{\left (d+e \log \left (c x^n\right )\right )^2} \, dx}{e}\\ &=\frac {(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}-\frac {(b d-a e) \int \frac {1}{d+e \log \left (c x^n\right )} \, dx}{e^2 n}+\frac {\left (b x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{d+e x} \, dx,x,\log \left (c x^n\right )\right )}{e n}\\ &=\frac {b e^{-\frac {d}{e n}} x \left (c x^n\right )^{-1/n} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n}+\frac {(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}-\frac {\left ((b d-a e) x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{d+e x} \, dx,x,\log \left (c x^n\right )\right )}{e^2 n^2}\\ &=-\frac {(b d-a e) e^{-\frac {d}{e n}} x \left (c x^n\right )^{-1/n} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^3 n^2}+\frac {b e^{-\frac {d}{e n}} x \left (c x^n\right )^{-1/n} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )}{e^2 n}+\frac {(b d-a e) x}{e^2 n \left (d+e \log \left (c x^n\right )\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 87, normalized size = 0.98 \begin {gather*} \frac {e^{-\frac {d}{e n}} (-b d+a e+b e n) x \left (c x^n\right )^{-1/n} \text {Ei}\left (\frac {d+e \log \left (c x^n\right )}{e n}\right )-\frac {e (-b d+a e) n x}{d+e \log \left (c x^n\right )}}{e^3 n^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*Log[c*x^n])^2,x]

[Out]

(((-(b*d) + a*e + b*e*n)*x*ExpIntegralEi[(d + e*Log[c*x^n])/(e*n)])/(E^(d/(e*n))*(c*x^n)^n^(-1)) - (e*(-(b*d)
+ a*e)*n*x)/(d + e*Log[c*x^n]))/(e^3*n^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.26, size = 370, normalized size = 4.16

method result size
risch \(-\frac {2 x \left (a e -b d \right )}{e^{2} n \left (2 d +2 e \ln \left (c \right )+2 e \ln \left (x^{n}\right )-i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i e \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i e \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}\right )}-\frac {\left (b e n +a e -b d \right ) x \left (x^{n}\right )^{-\frac {1}{n}} c^{-\frac {1}{n}} {\mathrm e}^{-\frac {-i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i e \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i e \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 d}{2 e n}} \expIntegral \left (1, -\ln \left (x \right )-\frac {-i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i e \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i e \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i e \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 e \ln \left (c \right )+2 e \left (\ln \left (x^{n}\right )-n \ln \left (x \right )\right )+2 d}{2 e n}\right )}{e^{3} n^{2}}\) \(370\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(d+e*ln(c*x^n))^2,x,method=_RETURNVERBOSE)

[Out]

-2/e^2/n*x*(a*e-b*d)/(2*d+2*e*ln(c)+2*e*ln(x^n)-I*e*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*e*Pi*csgn(I*c)*cs
gn(I*c*x^n)^2+I*e*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*c*x^n)^3)-(b*e*n+a*e-b*d)/e^3/n^2*x*(x^n)^(-1/n
)*c^(-1/n)*exp(-1/2*(-I*e*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*e*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*e*Pi*csgn(
I*x^n)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*c*x^n)^3+2*d)/e/n)*Ei(1,-ln(x)-1/2*(-I*e*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*
c*x^n)+I*e*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*e*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*e*Pi*csgn(I*c*x^n)^3+2*e*ln(c)+2*
e*(ln(x^n)-n*ln(x))+2*d)/e/n)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="maxima")

[Out]

-(b*d - (b*n + a)*e)*integrate(1/(d*n*e^2 + n*e^3*log(c) + n*e^3*log(x^n)), x) + (b*d - a*e)*x/(d*n*e^2 + n*e^
3*log(c) + n*e^3*log(x^n))

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 151, normalized size = 1.70 \begin {gather*} \frac {{\left ({\left (b d n x e - a n x e^{2}\right )} e^{\left (\frac {{\left (e \log \left (c\right ) + d\right )} e^{\left (-1\right )}}{n}\right )} - {\left (b d^{2} - {\left (b d n + a d\right )} e + {\left (b d e - {\left (b n + a\right )} e^{2}\right )} \log \left (c\right ) + {\left (b d n e - {\left (b n^{2} + a n\right )} e^{2}\right )} \log \left (x\right )\right )} \operatorname {log\_integral}\left (x e^{\left (\frac {{\left (e \log \left (c\right ) + d\right )} e^{\left (-1\right )}}{n}\right )}\right )\right )} e^{\left (-\frac {{\left (e \log \left (c\right ) + d\right )} e^{\left (-1\right )}}{n}\right )}}{n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="fricas")

[Out]

((b*d*n*x*e - a*n*x*e^2)*e^((e*log(c) + d)*e^(-1)/n) - (b*d^2 - (b*d*n + a*d)*e + (b*d*e - (b*n + a)*e^2)*log(
c) + (b*d*n*e - (b*n^2 + a*n)*e^2)*log(x))*log_integral(x*e^((e*log(c) + d)*e^(-1)/n)))*e^(-(e*log(c) + d)*e^(
-1)/n)/(n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{\left (d + e \log {\left (c x^{n} \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(d+e*ln(c*x**n))**2,x)

[Out]

Integral((a + b*log(c*x**n))/(d + e*log(c*x**n))**2, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 661 vs. \(2 (89) = 178\).
time = 4.72, size = 661, normalized size = 7.43 \begin {gather*} \frac {b d n x e}{n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )} + \frac {b n^{2} {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 2\right )} \log \left (x\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} - \frac {b d n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 1\right )} \log \left (x\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} - \frac {a n x e^{2}}{n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )} + \frac {b d n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 1\right )}}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} - \frac {b d^{2} {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n}\right )}}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} + \frac {b n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 2\right )} \log \left (c\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} - \frac {b d {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 1\right )} \log \left (c\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} + \frac {a n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 2\right )} \log \left (x\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} + \frac {a d {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 1\right )}}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} + \frac {a {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{n} + \frac {\log \left (c\right )}{n} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{n} + 2\right )} \log \left (c\right )}{{\left (n^{3} e^{4} \log \left (x\right ) + d n^{2} e^{3} + n^{2} e^{4} \log \left (c\right )\right )} c^{\left (\frac {1}{n}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(c*x^n))^2,x, algorithm="giac")

[Out]

b*d*n*x*e/(n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c)) + b*n^2*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1
)/n + 2)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d*n*Ei(d*e^(-1)/n + log(c)/n + log
(x))*e^(-d*e^(-1)/n + 1)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - a*n*x*e^2/(n^3*e^4*l
og(x) + d*n^2*e^3 + n^2*e^4*log(c)) + b*d*n*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 1)/((n^3*e^4*l
og(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d^2*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n)/((n^3*
e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + b*n*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 2)
*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) - b*d*Ei(d*e^(-1)/n + log(c)/n + log(x))*e^(-d
*e^(-1)/n + 1)*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*n*Ei(d*e^(-1)/n + log(c)/n +
 log(x))*e^(-d*e^(-1)/n + 2)*log(x)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*d*Ei(d*e^(-1)/
n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 1)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n)) + a*Ei(d*e^
(-1)/n + log(c)/n + log(x))*e^(-d*e^(-1)/n + 2)*log(c)/((n^3*e^4*log(x) + d*n^2*e^3 + n^2*e^4*log(c))*c^(1/n))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{{\left (d+e\,\ln \left (c\,x^n\right )\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(d + e*log(c*x^n))^2,x)

[Out]

int((a + b*log(c*x^n))/(d + e*log(c*x^n))^2, x)

________________________________________________________________________________________